import '@/styles/common.scss'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { useIntersectionObserver } from '@vueuse/core'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

import App from './App.vue'
import router from './router'


const app = createApp(App)

// pinia持久化
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate)
app.use(pinia)

app.use(router)

// 全局指令注册
import {lazyPlugin} from "@/directives";
app.use(lazyPlugin)

// 引入全局组件插件
import { componentPlugin } from '@/components'
app.use(componentPlugin)

app.mount('#app')
